<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
  <script type="text/javascript" src="../vue.js"></script>
</head>

<body>
  <div id="app-5">
    <p>{{ message }}</p>
    <p>{{ sb }}</p>
    <button v-on:click="reverseMessage">反转消息</button>
    <button v-on:click="AreverseMessage">反转天狗 </button>
  </div>
</body>
<script type="text/javascript">
  Vue.config.productionTip = false;
  var app5 = new Vue({
    el: '#app-5',
    data: {
      message: 'Hello Vue.js!',
      sb: "傻不傻啊你"
    },
    methods: {
      reverseMessage: function () {
        this.message = this.message.split('').reverse().join('')
      },
      AreverseMessage: function () {
        this.sb = this.sb.split('').reverse().join('')
      }
    }
  })
</script>

</html>